<script src="http://taymay.vn/js/ckeditor/ckeditor.js"></script>
<div class="container-fluid">
  <div class="row-fluid">
    <div class="span12">
    	<div class="container-inner">
			<hr />
    		<div class="row-fluid">
    			<div class="span6">
    				<div class="dropdown">
  					    <a href="javascript:void(0);" onclick="$('#login-form').modal('toggle');" class="btn btn-warning"><i class="icon-picture"></i> Upload Tattoos</a>
  					</div>
    			</div>
    			<div class="span6">
			    	<div class="btn-group" style="float: right">
					  <a href="/" class="btn active" style="color: #333"><i class="bg-icon recent selected"></i> Lasted Tattoos</a>					  
					  <a href="/" class="btn " style="color: #333"><i class="bg-icon views "></i> Most Tattoos</a> 					  		  
					</div>
    			</div>
    		</div>
    	</div>
    	<div class="container-inner" style="width: 960px; padding-left: 6px;">
			<div style="margin-top: 18px; position: relative;">			
				    <div id="mas_container">
					    <div class="mitem shadow page_content topics-list" style="height:300px">
					    	<div style="padding: 20px">
					    		<ul class="sf-menu sf-js-enabled sf-shadow">
					    			<li class="current"><a href="/gallery">All</a></li>					    			
					    			<?php if(!empty($cateInfo)): ?>								        
							        <?php foreach($cateInfo as $cate): ?>
								    <li class=""><a class="" href="/gallery/<?php echo $cate["category_slug"]?>"><?php echo $cate["category_name"]?></a></li>
							    	<?php endforeach; ?>       
        							<?php endif; ?> 
        							<li class="current"><a href="http://taymay.vn/showcase">Other</a></li>	
				    			</ul>
					    	</div>
					    </div>
              <?php if(!empty($latestPost)): ?>				      
              <?php $permalink = '';$arrUri = array();$i = 0;$indicator = '';$shareLink = ''; ?>
              <?php foreach($latestPost as $post): ?>
              <?php $i= $i+1; ?>
              <?php $post->post_title = strip_tags($post->post_title); $permalink = permalink(array('text' => $post->post_title, 'id' => $post->id));$shareLink = urlencode($permalink); ?>
              <?php $arrUri[] = $permalink;?>    
				    	<div class="mitem shadow page_content">
  						  	<a href="<?php echo $permalink; ?>">
  								<img style="height: 220px; width: 220px" src="<?php echo 'http://toptattoos.net/uploads/'.$post->post_image;//echo getImage($post->post_image) ?>" />
  							  </a>
    							<div style="overflow: hidden; padding: 8px; position: relative; height: 40px; line-height: 18px;">    								
    								<div style="float: left; width: 150px">
    									<div><a href="http://taymay.vn/minhthaong96"><?php echo substr($post->post_title,0,40);?></a></div>    							
    								</div>
    							</div>
  						</div>
  						<?php 	$post_end = $post->id; ?>      
  						<?php endforeach; ?> 
          		<?php endif; ?> 						
				</div>

				<input type="hidden" id="page" value="20" />
				<div align="center">
					<a href="javascript:void(0)" onclick="showcase_showmore('<?php echo $post_end;?>','<?php echo empty($cate_act)?'all':$cate_act;?>')" class="btn btn-large" id="showmore">Show More</a>
				</div>
			</div>
	    </div>
    </div>
  </div>
</div>

<div class="modal hide" id="upload-showcase-form" style="overflow: hidden;">
  <div class="modal-header">
    <h3>Đăng ảnh</h3>
  </div>
  <div class="modal-body">
    <div class="crud">
		<div class="controls" id="showcase_content_upload">
			<form id="frm_showcase_upload" enctype="multipart/form-data" method="POST" action="http://taymay.vn/showcase/upload_photo" accept-charset="UTF-8">			<input type="hidden" name="csrf_token" value="4ufLDhecj9DnS4FiAAgREl5dXtNBNKVuAjB8Ugc5">				<label>Chọn tệp tin ảnh:</label>
				<input class="input-file" type="file" id="showcase_picture" name="picture"/>
			</form>
			<div id="photo_step_preview"></div>
		</div>
    </div>
  </div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		// initialize
		$("#mas_container").masonry({
		  columnWidth: 240,
		  itemSelector: '.mitem'
		});
	});
</script>

